use "ESS.dta", clear

 
keep if University==1
 
 
* Dummy for whether is single or double cycle
 
 g Single_cycle=0
replace Single_cycle=1 if cntry=="AT"   |cntry=="DE" |cntry=="IT" |cntry=="HU" |cntry=="NL" |cntry=="PT"  |cntry=="SE"  | cntry=="FI"  | cntry=="EE"  | cntry=="BE"  | cntry=="HR"  

g ECTS=0
replace ECTS=1 if cntry=="AT" | cntry=="AL" |cntry=="DK" |cntry=="FI" |cntry=="EE" |cntry=="LV" |cntry=="LT" |cntry=="NL" | cntry=="PT" | cntry=="SE"   

g large_change=1
replace large_change=0 if ECTS==1 & Single_cycle==1


* Dummy for protest, based on literature
 g protest=0
replace protest=1 if cntry=="AT" | cntry=="DE"  |cntry=="ES" |cntry=="IT" |cntry=="FR" |cntry=="HR"  |cntry=="SE" 
 

 * Dummy for "Substantial fees", based on cited reports
 
 g Fees=0
 replace Fees=1 if cntry=="LV" | cntry=="LT" | cntry=="NL"  | cntry=="EE"     | cntry=="IT"
 
 
 * For crisis
 
 g Crisis=0
 replace Crisis=1 if intyear>2008
 
 
 * For Alumni
 
 rename edctn Student


gen Internship = .
replace Internship = 0 if inlist(cntry, "AT", "CZ", "HR", "PL", "PT" , "DE")
replace Internship = 1 if inlist(cntry, "DK", "EE", "FR", "FI", "HU")
replace Internship = 1 if inlist(cntry, "LT", "NL", "NO", "SE", "SI", "ES")

la var large_change " Adaptable degrees"
la var protest "Major student protest"
la var Fees "High tuition fees"
la var Crisis "Post 2008 crisis"
la var Student "Still studying"
la var Internship "Compulsory internship"
 

 * quietly eststo m1: reg Meritocracy Bologna c.Bologna#c.Gradual   Female Citizen  trend i.Country i.essround   i.yrbrn  if   short==1, vce(cluster Country)

quietly eststo m2: reg Meritocracy Bologna c.Bologna#c.large_change   Female Citizen  trend i.Country i.essround   i.yrbrn  if short==1, vce(cluster Country)

quietly eststo m3: reg Meritocracy Bologna c.Bologna#c.protest   Female Citizen trend i.Country i.essround   i.yrbrn  if   short==1, vce(cluster Country)

quietly eststo m5: reg Meritocracy Bologna c.Bologna#c.Fees   Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)

quietly eststo m5a: reg Meritocracy Bologna c.Bologna#c.Internship   Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)

quietly eststo m5b: reg Meritocracy Bologna c.Bologna#c.Crisis   Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)

quietly eststo m5c: reg Meritocracy Bologna c.Bologna#c.Student Student  Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)


 
* quietly eststo m6: reg Consumerism Bologna c.Bologna#c.Gradual  Female Citizen  trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)

quietly eststo m7: reg Consumerism Bologna c.Bologna#c.large_change   Female Citizen  trend i.Country i.essround   i.yrbrn  if   short==1, vce(cluster Country)

quietly eststo m8: reg Consumerism Bologna c.Bologna#c.protest  Female Citizen  trend i.Country i.essround   i.yrbrn  if   short==1, vce(cluster Country)

quietly eststo m10: reg Consumerism Bologna c.Bologna#c.Fees   Female Citizen trend i.Country i.essround   i.yrbrn  if    short==1, vce(cluster Country)

quietly eststo m10a: reg Consumerism Bologna c.Bologna#c.Internship   Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)


quietly eststo m10b: reg Consumerism Bologna c.Bologna#c.Crisis  Female Citizen trend i.Country i.essround   i.yrbrn  if    short==1, vce(cluster Country)

quietly eststo m10c: reg Consumerism Bologna c.Bologna#c.Student Student  Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)

 
 esttab  m2 m3 m5 m5a m5b m5c   m7 m8   m10 m10a m10b m10c using "T15A.tex", ///
    drop(trend *.Country *.essround *.yrbrn _cons  Female Citizen Student) ///
    b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) ///
    stats(N, fmt(%9.0fc) labels("N. Obs")) ///
    booktabs label nomtitles   mgroups("\shortstack{Personal achievement (status)}" "\shortstack{Personal achievement  (wealth)}", pattern(0  0  0 0 0 0  1 0 0 0  0 0 ) prefix(\multicolumn{@span}{c}{) suffix(})  span erepeat(\cmidrule(lr){@span}))  ///
    title("\scshape Heterogeneity by country characteristics (Personal achievement)") ///
    order(Bologna c.Bologna#c.large_change c.Bologna#c.protest c.Bologna#c.Fees c.Bologna#c.Internship   c.Bologna#c.Crisis c.Bologna#c.Student) ///
    replace

 

 * quietly eststo m1: reg Equality Bologna c.Bologna#c.Gradual  Female Citizen  trend i.Country i.essround   i.yrbrn  if University==1 &  short==1, vce(cluster Country)

quietly eststo m2: reg Equality Bologna c.Bologna#c.large_change  Female Citizen  trend i.Country i.essround   i.yrbrn  if University==1 &  short==1, vce(cluster Country)

quietly eststo m3: reg Equality Bologna c.Bologna#c.protest  Female Citizen trend i.Country i.essround   i.yrbrn  if University==1 &  short==1, vce(cluster Country)

quietly eststo m5: reg Equality Bologna c.Bologna#c.Fees   Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)

quietly eststo m5a: reg Equality Bologna c.Bologna#c.Internship   Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)


quietly eststo m5b: reg Equality Bologna c.Bologna#c.Crisis   Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)

quietly eststo m5c: reg Equality Bologna c.Bologna#c.Student Student  Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)



 
* quietly eststo m6: reg Environment Bologna c.Bologna#c.Gradual  Female Citizen  trend i.Country i.essround   i.yrbrn  if   short==1, vce(cluster Country)

quietly eststo m7: reg Environment Bologna c.Bologna#c.large_change  Female Citizen  trend i.Country i.essround   i.yrbrn  if    short==1, vce(cluster Country)

quietly eststo m8: reg Environment Bologna c.Bologna#c.protest  Female Citizen trend i.Country i.essround   i.yrbrn  if   short==1, vce(cluster Country)

quietly eststo m10: reg Environment Bologna c.Bologna#c.Fees  Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)

quietly eststo m10a: reg Equality Bologna c.Bologna#c.Internship   Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)
 
quietly eststo m10b: reg Environment Bologna c.Bologna#c.Crisis  Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)

quietly eststo m10c: reg Environment Bologna c.Bologna#c.Student Student  Female Citizen trend i.Country i.essround   i.yrbrn  if  short==1, vce(cluster Country)


 esttab  m2 m3   m5 m5a m5b m5c   m7 m8   m10 m10a m10b m10c using "T15B.tex", ///
    drop(trend *.Country *.essround *.yrbrn _cons  Female Citizen Student) ///
    b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) ///
    stats(N, fmt(%9.0fc) labels("N. Obs")) ///
    booktabs label nomtitles   mgroups("\shortstack{Global justice (equality)}" "\shortstack{Global justice (environment)}", pattern(0  0  0 0 0 0  1 0 0   0 0 0) prefix(\multicolumn{@span}{c}{) suffix(})  span erepeat(\cmidrule(lr){@span}))  ///
    title("\scshape Heterogeneity by country characteristics (Global justice)") ///
    order(Bologna   c.Bologna#c.large_change c.Bologna#c.protest   c.Bologna#c.Fees  c.Bologna#c.Internship  c.Bologna#c.Crisis c.Bologna#c.Student ) ///
    replace

 